package com.coincalf.wallet.service;

import com.coincalf.wallet.entity.UserAddress;
import com.baomidou.mybatisplus.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户钱包地址信息 服务类
 * </p>
 *
 * @author crow
 * @since 2018-05-16
 */
public interface UserAddressService extends IService<UserAddress> {

    /**
     * 查询用户钱包地址
     *
     * @param userId 用户ID
     * @param coinId 币种ID
     * @return
     */
    UserAddress queryByUserAndCoin(Long userId, Long coinId);


    /**
     * 获取钱包充值地址
     *
     * @param userId     用户ID
     * @param coinId     币种ID
     * @param mainCoinId 主链币种ID
     * @return
     */
    Map<String, String> getAddress(Long userId, Long coinId, Long mainCoinId);

    List<UserAddress> selectListByCoinId(Long coinId);

    /**
     * 查询地址是否是系统内地址
     *
     * @param address
     * @return
     */
    boolean selectExist(String address);
}
